package com.acwing.partition9;

import java.io.*;

/**
 * @author `RKC`
 * @date 2021/12/5 10:56
 */
public class AC883高斯消元解线性方程组 {

    private static final int N = 110;
    private static final double eps = 1e-8;
    private static double[][] g = new double[N][N];
    private static int n;

    private static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    private static final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        n = Integer.parseInt(reader.readLine());
        for (int i = 0; i < n; i++) {
            String[] ss = reader.readLine().split(" ");
            for (int j = 0; j < n + 1; j++) g[i][j] = Double.parseDouble(ss[j]);
        }
        int res = gauss();
        if (res == 1) writer.write("Infinite group solutions\n");
        else if (res == 2) writer.write("No solution\n");
        else {
            for (int i = 0; i < n; i++) {
                if (Math.abs(g[i][n]) < eps) g[i][n] = 0;
                writer.write(String.format("%.2f\n", g[i][n]));
            }
        }
        writer.flush();
    }

    private static int gauss() {
        int row, col;
        for (row = 0, col = 0; col < n; col++) {
            //找出绝对值最大行
            int maxr = row;
            for (int i = row; i < n; i++) {
                if (Math.abs(g[i][col]) > Math.abs(g[maxr][col])) maxr = i;
            }
            if (Math.abs(g[maxr][col]) < eps) continue;
            //将当前行移到非固定首行
            double[] t = g[maxr];
            g[maxr] = g[row];
            g[row] = t;
            //将非固定首行的首非零元变成1
            for (int i = n; i >= col; i--) g[row][i] /= g[row][col];
            //使用当前行将下列所有行消0
            for (int i = row + 1; i < n; i++) {
                if (Math.abs(g[i][col]) > eps) {
                    for (int j = n; j >= col; j--) {
                        g[i][j] -= g[i][col] * g[row][j];
                    }
                }
            }
            row++;
        }
        if (row < n) {
            for (int i = row; i < n; i++) {
                if (Math.abs(g[i][n]) > eps) return 2;
            }
            return 1;
        }
        //存在唯一解
        for (int i = n - 1; i >= 0; i--) {
            for (int j = i + 1; j < n; j++) {
                g[i][n] -= g[j][n] * g[i][j];
            }
        }
        return 0;
    }
}
